package org.speed.spring.core;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.beans.factory.BeanNameAware;

public class User implements BeanNameAware,BeanFactoryAware {

	private String beanName;
	
	BeanFactory beanFactory;
	
	private String name;
	
	private String age;
	
	public User() {
		
	}
	
	public User(String name, String age) {
		this.name = name;
		this.age = age;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getAge() {
		return age;
	}

	public void setAge(String age) {
		this.age = age;
	}
	

	@Override
	public String toString() {
		return "User [beanName=" + beanName + ", name=" + name + ", age=" + age + "]";
	}

	@Override
	public void setBeanName(String name) {
		this.beanName = name;
	}

	@Override
	public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
		this.beanFactory = beanFactory;
	}
	
}
